package com.niiwoo.civet.trade.dto.response.kaola;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * Created by daizhiyue on 2017/12/25.
 */
@Setter
@Getter
public class KaoLaLiCaiReceiveDTO implements Serializable {

    private static final long serialVersionUID = -442682862767897799L;

    public static final String SUCCESS_CODE = "0";

    private String code;

    private String msg;

    public KaoLaLiCaiReceiveDTO(String code) {
        this.code = code;
    }

    public KaoLaLiCaiReceiveDTO(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @JSONField(serialize = false)
    public boolean isSuccess() {
        return SUCCESS_CODE.equals(this.code);
    }

}
